package edu.gyc.mytest;

/**
 * @ClassName: edu.gyc.virus.Point
 * @Description: TODO
 * @author: Bruce Young
 * @date: 2020年02月02日 20:59
 */
public class Point {
    private int x;
    private int y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        if (x > 700) {
            x=400;
        }
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        if (y > 500) {
            y=300;
        }

        this.y = y;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
